using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace AgenciaEmpleo.Plantillas
{
    [DefaultEvent("SetActive")]

    public partial class WizardPage : UserControl
    {
        public WizardPage()
        {
            InitializeComponent();
        }
        
        protected frmMoldeWizard GetWizard()
        {
            frmMoldeWizard wizard = (frmMoldeWizard)this.ParentForm;
            return wizard;
        }

        protected void SetWizardButtons(WizardButtons buttons)
        {
            GetWizard().SetWizardButtons(buttons);
        }

        protected void EnableCancelButton(bool enableCancelButton)
        {
            GetWizard().EnableCancelButton(enableCancelButton);
        }

        [Category("Wizard")]
        public event CancelEventHandler SetActive;

        public virtual void OnSetActive(CancelEventArgs e)
        {
            if (SetActive != null)
                SetActive(this, e);
        }

        [Category("Wizard")]
        public event WizardPageEventHandler WizardNext;

        public virtual void OnWizardNext(WizardPageEventArgs e)
        {
            if (WizardNext != null)
                WizardNext(this, e);
        }

        [Category("Wizard")]
        public event WizardPageEventHandler WizardBack;

        public virtual void OnWizardBack(WizardPageEventArgs e)
        {
            if (WizardBack != null)
                WizardBack(this, e);
        }

        [Category("Wizard")]
        public event CancelEventHandler WizardFinish;

        public virtual void OnWizardFinish(CancelEventArgs e)
        {
            if (WizardFinish != null)
                WizardFinish(this, e);
        }
    }
}
